﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">

<!-- jsp文件头和头部 -->
<%@ include file="../system/admin/top.jsp"%>
<script type="text/javascript" src="static/js/myjs/head.js${getTime}"></script>
<script type="text/javascript" src="static/js/layer.js"></script>
<link rel="stylesheet" href="static/css/layui.css" media="all">
<script type="text/javascript">
	$(function() {
		//日期框
		$('.date-picker').datepicker();
	
	});
	//罚息退回申请
	function add2(callLoanNid){
		openDialog({
			title:"申请罚息退回操作",
			url:"<%=basePath%>faxijianmian/faxituihuiApply.do?callLoanNid="+callLoanNid,
		});
	}
	//罚息减免申请
	function add(callLoanNid){
		openDialog({
			title:"申请罚息减免操作",
			url:"<%=basePath%>faxijianmian/faxijianmianApply.do?callLoanNid="+callLoanNid,
		});
	}
	
	//打开弹出框
		function openDialog(options){
            var defaultOptions = {
                title:"",
                url:"",
                callBack:function(){}
            };
            options = $.extend(defaultOptions, options);

            layer.open({
				title:options.title,
                fixed:false,
                type: 2,
                content: options.url,
                area: ['750px', '500px'],
                end:options.callBack
            });
        }
</script>
</head>

<body>
		<div style="width: 1900px">
			<form action="<%=basePath%>faxijianmian/faxichaxun.do" method="post" name="pageForm" id="pageForm" class="form-inline">
				<!-- 高级查询=============================================================== -->
				<div style="border: 1px solid darkgray;padding: 6px; ">
                    		<div class="form-line" style="line-height: 40px">
						<label class="input-group-addon">催收编号：</label>
                        		<input style="width: 150px" type="text" class="form-control" name="callLoanNid" value="${pd.callLoanNid}" />
						<label class="input-group-addon">还款订单号：</label>
                        		<input style="width: 150px" type="text" class="form-control" name="repaymentId" value="${pd.repaymentId}" />
						<label class="input-group-addon">借款人姓名：</label>
                        		<input style="width: 150px" type="text" class="form-control" name="realName" value="${pd.realName}" />
						<label class="input-group-addon">借款人身份证号：</label>
                        		<input style="width: 150px" type="text" class="form-control" name="contIdCard" value="${pd.contIdCard}" />
                    		</div>
                        <label class="btn btn-primary btn-small" onclick="search();">查询</label>
                    	</div>
                    	<br>
				<!-- 高级查询=============================================================== -->
				<table id="table_report"
					class="table table-bordered table-hover" >
					<thead>
						<tr>
							<th>序号</th>
							<th>催收编号</th>

							<th>借款产品名称</th>
							<th>还款订单号</th>
							<th>借款人姓名</th>
							<th>借款人身份证</th>
							<th>已还罚息</th>
							<th>已减免罚息</th>
							<th>已退回罚息</th>
							<th>待还罚息</th>
							<th class="center">操作</th>
						</tr>
					</thead>
					<tbody>
						<!-- 开始循环 -->
						<c:choose>
							<c:when test="${not empty pageList}">
								<c:if test="${true}">
									<c:forEach items="${pageList}" var="var" varStatus="vs">
										<tr>
											<td>${vs.count}</td>
											<td>${var.callLoanNid}</td><!-- 催收编号 -->
											<td>${var.productName}</td>
											<td>${var.repaymentId}</td>
											<td>${var.realName}</td>
											<td>${var.contIdCard}</td>
											<td>${var.receveFee}</td>
											<td>${var.userReduOverdueFee}</td>
											<td>${var.penaltyInterestReturn}</td>
											<th>${var.overdueFee}</th>
											<td class="center">
												<div>
													<c:if test="${var.receveFee != '0.00' and var.overdueFee != '0.00'}">
														<a href="javascript:void(-1);" style="color: blue;cursor: pointer;" onclick="add2('${var.callLoanNid}')" >申请罚息退回</a>
														<a href="javascript:void(-1);" style="color: green;cursor: pointer;" onclick="add('${var.callLoanNid}')" >申请罚息减免</a>
													</c:if>
													<c:if test="${var.receveFee == '0.00' and var.overdueFee != '0.00'}">
														<a href="javascript:void(-1);" style="color: gray;cursor: pointer;" >申请罚息退回</a>
														<a href="javascript:void(-1);" style="color: green;cursor: pointer;" onclick="add('${var.callLoanNid}')" >申请罚息减免</a>
													</c:if>
													<c:if test="${var.receveFee != '0.00' and var.overdueFee == '0.00'}">
														<a href="javascript:void(-1);" style="color: blue;cursor: pointer;" onclick="add2('${var.callLoanNid}')" >申请罚息退回</a>
														<a href="javascript:void(-1);" style="color: gray;cursor: pointer;" >申请罚息减免</a>
													</c:if>
													<c:if test="${var.receveFee == '0.00' and var.overdueFee == '0.00'}">
														<a href="javascript:void(-1);" style="color: gray;cursor: pointer;" >申请罚息退回</a>
														<a href="javascript:void(-1);" style="color: gray;cursor: pointer;" >申请罚息减免</a>
													</c:if>
												</div></td>
										</tr>
									</c:forEach>
								</c:if>
								<c:if test="${false}">
									<tr>
										<td colspan="100" class="center">您无权查看</td>
									</tr>
								</c:if>
							</c:when>
							<c:otherwise>
								<tr class="main_info">
									<td colspan="100" class="center">没有相关数据</td>
								</tr>
							</c:otherwise>
						</c:choose>
					</tbody>
				</table>

				<div class="page-header position-relative">
					<table style="width: 100%;">
						<tr>
							<td style="vertical-align: top;">
							<div class="pagination"
									style="float: right; padding-top: 0px; margin-top: 0px;">${page.pageStr}

							</div></td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	<!-- 返回顶部  -->
	<a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse"> <i
		class="icon-double-angle-up icon-only"></i>
	</a>
	<!-- 引入 -->
	<script src="static/js/bootstrap.min.js"></script>
	<script type="text/javascript"
		src="static/js/bootstrap-datepicker.min.js"></script>
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
	<!--提示框-->
	<script type="text/javascript">
		$(top.hangge());
		function search(){
			top.jzts();
			$("#pageForm").submit();
		}
	</script>

</body>
</html>

